<?php
/**
 * Created by PhpStorm.
 * User: Admin
 * Date: 2017-09-22
 * Time: 下午 10:00
 */

foreach (glob('img/*.gif') as $file) {
    $content = file_get_contents($file);
    if(substr($content, 0, strlen('<html>')) == '<html>') {
        unlink($file);
        echo "unlink $file\n";
    }
}

